<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>simCreateMeshShape</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1><a href="../apiOverview.htm">Regular API</a> function</h1>
<h3 class=subsectionBar><a name="simCreateMeshShape" id="simCreateMeshShape"></a>simCreateMeshShape / sim.createMeshShape </h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Creates a mesh shape. See also <a href="simCreatePureShape.htm">sim.createPureShape</a>, <a href="simCreateHeightfieldShape.htm">sim.createHeightfieldShape</a> and <a href="simGetShapeMesh.htm">sim.getShapeMesh</a>, and see <a href="simImportMesh.htm">sim.importMesh</a> for a usage example.<br></td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn>simInt simCreateMeshShape(simInt options,simFloat shadingAngle,const simFloat* vertices,simInt verticesSize,const simInt* indices,simInt indicesSize,simFloat* reserved)<br></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div><strong>options</strong>: Bit-coded: if bit0 is set (1), backfaces are culled. If bit1 is set (2), edges are visible</div>
<div><strong>shadingAngle</strong>: the shading angle</div>
<div><strong>vertices</strong>: an array of vertices</div>
<div><strong>verticesSize</strong>: the size of the vertice array</div>
<div><strong>indices</strong>: an array of indices</div>
<div><strong>indicesSize</strong>: the size of the indice array</div>
<div><strong>reserved</strong>: reserved for future extensions. Keep at nullptr.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div>-1 if operation was not successful, otherwise the handle of the newly created shape<br>
</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>number objectHandle=sim.createMeshShape(number options,number shadingAngle,table vertices,table indices)<br></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>options</strong>: Bit-coded: if bit0 is set (1), backfaces are culled. If bit1 is set (2), edges are visible</div>
<div><strong>shadingAngle</strong>: the shading angle</div>
<div><strong>vertices</strong>: a table of vertices</div>
<div><strong>indices</strong>: a table of indices</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>Similar to the C-function counterpart</div>
<div></div>
</td> 
</tr> 
</table> 

<br>
<p><a href="../apiFunctions.htm">All regular API functions on one page</a></p>
<br>
<br>
</td>
</tr>
</table>
</div>
</body>
</html>
